Recreating The Chladni Pattern
Watching a Houdini Video by Junichiro Horikawa HERE that builds the Chladni (Cymatic) resonance effect in 3D and thought it a good exercise to recreate in an Unreal Material.
Version 1.0
More correct version below
So the video starts by breaking down the following the algorithm from Paul Bourke
cos(n.PI.x./L) cos(m pi y / L) - cos(m pi x / L) cos(n pi y / L) = 0
It is stated on Paul’s page that you need to keep X/Y/Z between zero and PI for each axis. In the Houdini version you needed to remap the point numbers (@ptnum) by the resolution (divisions) of the square but since our UV coordinates are already normalized we can skip that.
So we just need to multiply our R and G components by PI to have our UV mapped 0 to PI
Which we can do like this
Then you can wrap up the final part of the equation like so. I’ve used a period of 6.28 in the cosine node. Which should equate to 1Hz, but I haven’t been able to recreate the same frequencies I’ve seen online with that.
I still need to read more about this, but if you can correct please do
And everything has worked out, it should look like this.
1 ) Effect as above
2 ) World Position Offset
3 ) Radial Coordinates
To try and replicate the oscilloscopes that normally show this type of effect using Hertz, I made a custom hlsl node and multiplied the cosine period to see it dynamically.
Version 2.0
Ok, so some further investigation lead me to some other algorithm variations of the effect that is more what I’m expecting and I’m able to recreate the patterns that are on the paulbourke page.
Here is my material graph, which is a bit simpler and means I’m able to recreate the patterns shown on various youtube videos for example
I almost recreated all the patterns shown on the illustration from the original Chladni publication, some of them were just too tricky to get. Will continue updating this post if I manage to find the settings for the incorrect & blurred tiles.